package com.hyzh.latte.vehicle.dmo.entity;

import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 杆子
 * @author songkui
 * @since 2024/2/21 17:24
 */
@Data
@EqualsAndHashCode(of ={"id", "parkCode"}, callSuper = false)
@Accessors(chain = true)
@TableName("park")
public class ParkPGEntity {

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    //所属园区
    @TableField("park_code")
    private String parkCode;

    //名称
    @TableField("park_name")
    private String parkName;

    @TableField("gather_number")
    private Integer gatherNumber;

    @TableField("gather_url")
    private String gatherUrl;

    @TableField("formal_code")
    private String formalCode;

    @TableField("gather_rad")
    private Integer gatherRad;

    @TableField("stream_url")
    private String streamUrl;

    @TableField("v_url")
    private String vUrl;


    public boolean checkGather(){
        return null == gatherNumber || StrUtil.isEmpty(gatherUrl) ||null == gatherRad;
    }

}
